<?
// +----------------------------------------------------------------------+
// | PIE Graph Class                                                      |
// | Creating Pie Graphs on the fly                                       |
// | Requirements: GD Library >= 2.0                                      |
// | This file explains how to use and call the class                     |
// +----------------------------------------------------------------------+
// | Author: Nico Puhlmann <nico@puhlmann.com>                            |
// +----------------------------------------------------------------------+
// $Id: example.php,v 1.0 2005/05/02 17:41:12 npuhlmann Exp $

include_once "settings.php";
require("{$_GLOBAL['reunionhome']}/lib/piegraph.class.php");

$yes = isset($_GET['yes']) ? $_GET['yes'] : 0;
$no = isset($_GET['no']) ? $_GET['no'] : 0;

$pie = new PieGraph(50, 50, array($yes, $no));	// class call with the width, height & data
$pie->setColors(array("#000091","#a40000"));	// colors for the data
$pie->setLegends(array("Yes", "No"));			// legends for the data
$pie->set3dHeight(1);							// Height of the pie 3d effect
$pie->display();								// Display the graph
?>